package com.mvc.entity;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import org.springframework.context.annotation.Lazy;

@Entity
@Lazy(false)
@Table(name = "is_user",uniqueConstraints=@UniqueConstraint(columnNames = { "id","username" }))
public class Icon_User implements Serializable {
	private static final long serialVersionUID = 1L;

  private Long id;
  private String username;
	private String password;
	private Integer authority;
	private Timestamp registerDate;
	private Timestamp lastLoginDate;
	private String sessionId;
  
	@Id
	@Column(name = "id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
  public Long getId() {
    return id;
  }
  public void setId(Long id) {
    this.id = id;
  }
  @Basic(optional = false)
  @Column(name = "username")
  public String getUsername() {
    return username;
  }
  public void setUsername(String username) {
    this.username = username;
  }
  @Basic(optional = false)
  @Column(name = "password")
  public String getPassword() {
    return password;
  }
  public void setPassword(String password) {
    this.password = password;
  }
  @Basic(optional = false)
  @Column(name = "authority")
  public Integer getAuthority() {
    return authority;
  }
  public void setAuthority(Integer authority) {
    this.authority = authority;
  }
  @Basic(optional = false)
  @Column(name = "register_date")
  public Timestamp getRegisterDate() {
    return registerDate;
  }
  public void setRegisterDate(Timestamp registerDate) {
    this.registerDate = registerDate;
  }
  @Column(name = "last_login_date")
  public Timestamp getLastLoginDate() {
    return lastLoginDate;
  }
  public void setLastLoginDate(Timestamp lastLoginDate) {
    this.lastLoginDate = lastLoginDate;
  }
  @Column(name = "session_id")
  public String getSessionId() {
    return sessionId;
  }
  public void setSessionId(String sessionId) {
    this.sessionId = sessionId;
  }
}
